# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: 04_私有化.py
# Time: 21:03

class Demo(object):
    def __init__(self):
        self.__num = 100
        self._name = "小邓"


    def setNum(self, newNum):
        self.__num = newNum

    def getNum(self):
        return self.__num

    def __print(self):
        print("print")

if __name__ == '__main__':
    demo = Demo()
    demo.setNum(50)
    print(demo.getNum())
    print(demo._name)
    print(demo._Demo__num) # 可以使用_类名私有属性（相当于把类名变量更改了）
